Using the <iframe> Element
The <iframe> (inline frame) element in HTML is used to embed another HTML document within the current page. It creates a rectangular frame where the external content is displayed.
It allows embedding entire web pages, maps, videos, or other content from external sources.
Common uses include embedding YouTube videos, Google Maps, or widgets from other sites.
Attributes include src (URL to embed), width, height, title (for accessibility), and sandbox (for security).
The allowfullscreen attribute enables full-screen mode for videos.
The loading="lazy" attribute defers loading until the iframe is visible, improving page performance.
In short: <iframe> is used to display external web content within your page while keeping it separate from your main HTML structure.